<{Tinclude "commom/admin_header"}>
   <{Tinclude"tenantcommom/tenant_inner_header"}>
    <{Tinclude"tenantcommom/tenant_left_menu"}>

    <section id="main-content">
          <section class="wrapper">

              <div class="row">
                  
                  <div class="col-lg-9 main-chart">
                  
                      <div class="row mt">
                          
                          <div class="col-md-6 col-sm-6 mb">
                      		<div class="darkblue-panel pn">
                      			<div class="darkblue-header">
						  			<h5>登录信息</h5>
                      			</div>
                      			<h1 class="mt"><img data-tid="<{$tenant["id"]}>" src="<{$tenant["thumb"]}>" data-psrc="<{$tenant["image"]}>"  class="img-circle tenanttx cursor" width="80" data-toggle="modal" data-target="#ajax_upload_file" /></h1>
                                    
                                        <div class="row">
                                            <div class="info col-sm-6 col-xs-6 bold"><h5 class=" small edit_user_name height34" data-toggle="tooltip" data-placement="top"><span class="spanusername"><{if $tenant["is_third"]===1}><{$tenant["base_name"]}><{else}><{$tenant["user_name"]}><{/if}></span><span class="fa fa-pencil margin_left10 cursor edit_user_name_btn"></span></h5><span class="inputuser_name nodisplay"><input data-tid="<{$tenant["id"]}>" class="form-control jpinput text-center" value="<{if $tenant["is_third"]===1}><{$tenant["base_name"]}><{else}><{$tenant["user_name"]}><{/if}>" name="user_name"></span></div>
                                        <div class="info col-sm-6 col-xs-6 bold"><h5 class=" small edit_user_pwd height34" data-toggle="tooltip" data-placement="top">密码:****<span class="fa fa-pencil margin_left10 cursor edit_user_pwd_btn"></span></h5><span class="inputuser_pwd nodisplay"><input data-tid="<{$tenant["id"]}>" type="password" class="form-control jpinput text-center"  name="user_pwd"></span></div>
                                        <div class="info col-sm-6 col-xs-6 bold"><h5 class=" small edit_user_email height34"><span class="spanuseremail">邮箱:<{if $tenant["email"]}><{$tenant["email"]}><{else}>未填<{/if}></span><span class="fa fa-pencil margin_left10 cursor edit_user_email_btn"></span></h5><span class="inputuser_email nodisplay"><input data-tid="<{$tenant["id"]}>" class="form-control jpinput text-center" value="<{if $tenant["email"]}><{$tenant["email"]}><{/if}>" name="user_email"></span></div>
                                        <div class="info col-sm-6 col-xs-6 bold"><h5 class=" small edit_user_phone height34"><span class="spanuserphone">手机:<{if $tenant["mobile_phone"]}><{$tenant["mobile_phone"]}><{else}>未填<{/if}></span><span class="fa fa-pencil margin_left10 cursor edit_user_phone_btn"></span></h5><span class="inputuser_phone nodisplay"><input data-tid="<{$tenant["id"]}>" class="form-control jpinput text-center" value="<{if $tenant["mobile_phone"]}><{$tenant["mobile_phone"]}><{/if}>" name="user_phone"></span></div>
                                        </div>
                               
                                       
							
                                        <div class="centered padding_bottom10" title="最后一次登录时间">
										<i class="fa fa-clock-o"></i> <{echo date("Y-m-d H:i:s",$tenant["last_login_time"]);}>
									</div>
                                                                        
								
                      		</div><!-- -- /darkblue panel ---->
                      	</div>
                          
                          
                          <div class="col-lg-6 col-md-6 col-sm-6 mb">
							<div class="twitter-panel pn">
								<i class="fa fa-user fa-4x"></i>
                                                                <p class="user"><span class="edit_base_name"><span class="spanbasename">姓名@<{$tenant["base_name"]}></span><span class="fa fa-pencil margin_left10 cursor edit_base_name_btn"></span></span><span class="inputbase_name nodisplay"><input data-tid="<{$tenant["id"]}>"  class="form-control jpinput text-center" value="<{if $tenant["base_name"]}><{$tenant["base_name"]}><{/if}>"  name="base_name"></span></p>
                                                                <{if $tenant["id_card"]}><p><span class="edit_id_card"><span class="spanidcard">身份证@<{$tenant["id_card"]}></span><span class="fa fa-pencil margin_left10 cursor edit_id_card_btn"></span></span><span class="inputid_card nodisplay"><input data-tid="<{$tenant["id"]}>"  class="form-control jpinput text-center" value="<{if $tenant["id_card"]}><{$tenant["id_card"]}><{/if}>"  name="id_card"></span></p><{/if}>
                                                                <{if $tenant["work_address"]}><p><span class="edit_work_address"><span class="spanworkaddress">工作地址:<{$tenant["work_address"]}></span><span class="fa fa-pencil margin_left10 cursor edit_work_address_btn"></span></span><span class="inputwork_address nodisplay"><input data-tid="<{$tenant["id"]}>"  class="form-control jpinput text-center" value="<{if $tenant["work_address"]}><{$tenant["work_address"]}><{/if}>"  name="work_address"></span></p><{/if}>
                                                                <p class="jpmylocal cursor">位置<span class="fa fa-map-marker"></span>:&nbsp;&nbsp;<span class="jplabelprovince"><{$tenant["province"]}></span>&nbsp;&nbsp;<span class="jplabelcity"><{$tenant["city"]}></span>&nbsp;&nbsp;<span class="jplabeldistrict"><{$tenant["district"]}></span></p>
                                                                <p title="最后一次登录ip">
										<span class="fa fa-rocket"></span> <{$tenant["last_login_ip"]}>
								</p>
							</div>
						</div>
                          
                          
                          
                          
                          
                      </div>
                  </div>
                  
                  <div class="col-lg-3 ds">
                      
                  </div>
                  
                  
                  
                  
              </div>
          </section>
    </section>
    <{Tinclude "commom/ajax_upload_file"}>
    <script>
        $(document).ready(function(){
            $(".edit_user_name_btn").click(function(){
                 $(".inputuser_name").show();
                 $(".edit_user_name").hide();
                 $("input[name='user_name']").focus();
            });
             $(".edit_user_pwd_btn").click(function(){
                 $(".inputuser_pwd").show();
                 $(".edit_user_pwd").hide();
                 $("input[name='user_pwd']").focus();
            });
            
            $(".edit_user_email_btn").click(function(){
                 $(".inputuser_email").show();
                 $(".edit_user_email").hide();
                 $("input[name='user_email']").focus();
            });
            
            $(".edit_user_phone_btn").click(function(){
                 $(".inputuser_phone").show();
                 $(".edit_user_phone").hide();
                 $("input[name='user_phone']").focus();
            });
            
             $(".edit_base_name_btn").click(function(){
                 $(".inputbase_name").show();
                 $(".edit_base_name").hide();
                 $("input[name='base_name']").focus();
            });
            
             $(".edit_id_card_btn").click(function(){
                 $(".inputid_card").show();
                 $(".edit_id_card").hide();
                 $("input[name='id_card']").focus();
            });
            
               $(".edit_work_address_btn").click(function(){
                 $(".inputwork_address").show();
                 $(".edit_work_address").hide();
                 $("input[name='work_address']").focus();
            });
            
            
            $("input[name='user_name']").blur(function(){
                var user_name=$(this).val();
                var tid=$(this).data("tid");
                var url="<{echo Common::RewriteUrl("Tenantadmin","public_ajax_editusername");}>";
                $.post(url,{"tid":tid,"user_name":user_name},function(data){
                    if(data.status==1){
                        $(".spanusername").html(user_name);
                       
                    }
                     
                    
                     $(".inputuser_name").hide();
                     $(".edit_user_name").show();
                     $('.edit_user_name').tooltip('destroy');
                     $(".edit_user_name").attr("title",data.msg);
                     $(".edit_user_name").tooltip({trigger:"manual"});
                     
                     $(".edit_user_name").tooltip('show');
                     window.setTimeout(function(){$(".edit_user_name").tooltip('hide');},"3000");
                },"json");
                
            });
            
            
            $("input[name='user_pwd']").blur(function(){
                var user_pwd=$(this).val();
                var tid=$(this).data("tid");
                var url="<{echo Common::RewriteUrl("Tenantadmin","public_ajax_edituserpwd");}>";
                $.post(url,{"tid":tid,"user_pwd":user_pwd},function(data){
                     
                    
                     $(".inputuser_pwd").hide();
                     $(".edit_user_pwd").show();
                     $('.edit_user_pwd').tooltip('destroy');
                     $(".edit_user_pwd").attr("title",data.msg);
                     $(".edit_user_pwd").tooltip({trigger:"manual"});
                     $(".edit_user_pwd").tooltip('show');
                     window.setTimeout(function(){$(".edit_user_pwd").tooltip('hide');},"3000");
                },"json");
                
            });
            
            $("input[name='user_email']").blur(function(){
                var user_email=$(this).val();
                var tid=$(this).data("tid");
                var url="<{echo Common::RewriteUrl("Tenantadmin","public_ajax_edituseremail");}>";
                $.post(url,{"tid":tid,"user_email":user_email},function(data){
                    if(data.status==1){
                        $(".spanuseremail").html("邮箱:"+user_email);
                       
                    }
                     
                    
                     $(".inputuser_email").hide();
                     $(".edit_user_email").show();
                     $('.edit_user_email').tooltip('destroy');
                     $(".edit_user_email").attr("title",data.msg);
                     $(".edit_user_email").tooltip({trigger:"manual"});
                     
                     $(".edit_user_email").tooltip('show');
                     window.setTimeout(function(){$(".edit_user_email").tooltip('hide');},"3000");
                },"json");
                
            });
            
            
            $("input[name='user_phone']").blur(function(){
                var user_phone=$(this).val();
                var tid=$(this).data("tid");
                var url="<{echo Common::RewriteUrl("Tenantadmin","public_ajax_edituserphone");}>";
                $.post(url,{"tid":tid,"user_phone":user_phone},function(data){
                    if(data.status==1){
                        $(".spanuserphone").html("手机:"+user_phone);
                       
                    }
                     
                    
                     $(".inputuser_phone").hide();
                     $(".edit_user_phone").show();
                     $('.edit_user_phone').tooltip('destroy');
                     $(".edit_user_phone").attr("title",data.msg);
                     $(".edit_user_phone").tooltip({trigger:"manual"});
                     
                     $(".edit_user_phone").tooltip('show');
                     window.setTimeout(function(){$(".edit_user_phone").tooltip('hide');},"3000");
                },"json");
                
            });
            
            
            
            $("input[name='base_name']").blur(function(){
                var base_name=$(this).val();
                var tid=$(this).data("tid");
                var url="<{echo Common::RewriteUrl("Tenantadmin","public_ajax_editbase_name");}>";
                $.post(url,{"tid":tid,"base_name":base_name},function(data){
                    if(data.status==1){
                        $(".spanbasename").html("姓名@"+base_name);
                       
                    }
                     
                    
                     $(".inputbase_name").hide();
                     $(".edit_base_name").show();
                     $('.edit_base_name').tooltip('destroy');
                     $(".edit_base_name").attr("title",data.msg);
                     $(".edit_base_name").tooltip({trigger:"manual"});
                     
                     $(".edit_base_name").tooltip('show');
                     window.setTimeout(function(){$(".edit_base_name").tooltip('hide');},"3000");
                },"json");
                
            });
            
            
            $("input[name='id_card']").blur(function(){
                var id_card=$(this).val();
                var tid=$(this).data("tid");
                var url="<{echo Common::RewriteUrl("Tenantadmin","public_ajax_editid_card");}>";
                $.post(url,{"tid":tid,"id_card":id_card},function(data){
                    if(data.status==1){
                        $(".spanidcard").html("身份证@"+id_card);
                       
                    }
                     
                    
                     $(".inputid_card").hide();
                     $(".edit_id_card").show();
                     $('.edit_id_card').tooltip('destroy');
                     $(".edit_id_card").attr("title",data.msg);
                     $(".edit_id_card").tooltip({trigger:"manual"});
                     
                     $(".edit_id_card").tooltip('show');
                     window.setTimeout(function(){$(".edit_id_card").tooltip('hide');},"3000");
                },"json");
                
            });
            
            
            $("input[name='work_address']").blur(function(){
                var work_address=$(this).val();
                var tid=$(this).data("tid");
                var url="<{echo Common::RewriteUrl("Tenantadmin","public_ajax_editwork_address");}>";
                $.post(url,{"tid":tid,"work_address":work_address},function(data){
                    if(data.status==1){
                        $(".spanworkaddress").html("工作地址:"+work_address);
                       
                    }
                     
                    
                     $(".inputwork_address").hide();
                     $(".edit_work_address").show();
                     $('.edit_work_address').tooltip('destroy');
                     $(".edit_work_address").attr("title",data.msg);
                     $(".edit_work_address").tooltip({trigger:"manual"});
                     
                     $(".edit_work_address").tooltip('show');
                     window.setTimeout(function(){$(".edit_work_address").tooltip('hide');},"3000");
                },"json");
                
            });
            
            $(".tenanttx").change(function(){
                var tid=$(this).data("tid");
                var image=$(this).data("psrc");
                
                 var url="<{echo Common::RewriteUrl("Tenantadmin","public_ajax_editimage");}>";
                $.post(url,{"tid":tid,"image":image},function(data){
                    
                },"json");
            });
            
        });
    </script>
    
<{Tinclude"commom/admin_footer"}>